// ----- Select2 custom styles.
.nx-page .select2-container {
  margin-bottom: .5em;
}

.nx-page .dataInput .select2-container {
  margin-bottom: 0;
}

.nx-page .select2-container .select2-choice,
.nx-page .select2-container-multi .select2-choices {
  background-image: none;
  border-color: $shade-medium-10;
  border-radius: 2px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .07) inset;
  font-family: inherit;
  font-size: inherit;
}

.nx-page .select2-container .select2-choice {
  border-radius: 2px 4px 4px 2px;
}

.nx-page .select2-container a:link,
.nx-page .select2-container a:hover,
.nx-page .select2-container a.select2-choice,
.nx-page .select2-container a.select2-choice:hover,
.nx-page .select2-container a.select2-choice .select2-chosen {
  color: $font-color;
  text-decoration: none;
  transition: none;
}

.nx-page .select2-search .select2-input {
  margin-bottom: 0;
}

.nx-page .select2-container-multi .select2-choices .select2-search-field input {
  font-family: inherit;
}

.nx-page .select2-container .select2-choice .select2-arrow {
  background: none 0;
  border-color: $shade-medium-10;
}

.nx-page .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
  cursor: text;
  margin: 0 .3em 0 0;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.nx-page .select2-result-label > a {
  vertical-align: top;
}

.select2-result-label table {
  width: 100%;
}

.nx-page .select2-results img {
  margin: .1em .4em -.2em 0;
  max-height: 14px;
  width: 14px;
}

.nx-page .select2-nx-disabled {
  opacity: .3;
}

.nx-page .select2-choices .select2-search-choice img {
  margin: 0 .3em -.2em -.2em;
  max-height: 14px;
  width: 14px;
}

.nx-page .select2-search-choice table td {
  padding: 0;
}

.nx-page .select2-choices .detail,
.nx-page .select2-results .detail {
  display: block;
  padding: .1em 0 .1em 1.6em;
}

.nx-page .select2-results .select2-result-label .detail {
  padding-left: 2em;
}

.nx-page .select2-results .select2-result-label td .detail {
  padding: 0;
}

.nx-page .select2-choice .select2-chosen img {
  margin: .4em .4em -.2em 0;
}

.nx-page .select2-container-active .select2-focused,
.nx-page .select2-container-active .select2-focused:focus {
  box-shadow: none;
}

.nx-page .select2-container-multi .select2-choices .select2-search-choice,
.nx-page .select2-container.select2-container-disabled .select2-choice > .select2-chosen {
  background: $shade-light-20 none;
  border: 0;
  border-radius: 16px;
  box-shadow: none;
  display: inline-block;
  margin: .2em .3em .3em 0;
  min-height: 24px;
  padding: .4em 2em .4em 1em;
}

.nx-page .select2-container.select2-container-disabled .select2-choice > .select2-chosen {
  padding: .1em 1.7em .1em 1em;
}

.nx-page .select2-container-multi .select2-search-choice-close {
  left: auto;
  right: 6px;
  top: 6px;
}

.nx-page .s2newTag {
  display: inline-block;
}

.nx-page .select2-drop,
.nx-page .select2-results .select2-highlighted {
  color: $font-color;
}

.nx-page .select2-results .select2-highlighted {
  background: $shade-light-50;
}

.nx-page .select2-results .select2-searching,
.nx-page .select2-results .select2-no-results,
.nx-page .select2-results .select2-result-label {
  font-size: .8em;
  padding: .3em .5em;
}

.nx-page .select2-results .select2-result-label {
  padding: .2em .5em .3em;
}

.widgetPanel .select2-container .select2-choice > .select2-chosen {
  white-space: normal;
}

// make select2 appears in front of fancybox
.nx-page .select2-drop {
  z-index: 10099;
}

.nx-page .select2-drop-mask {
  z-index: 10098;
}

// Customize readonly mode used for view mode
.nx-page div.select2-container-disabled > a.select2-choice,
.nx-page div.select2-container-disabled > ul.select2-choices {
  background: 0;
  border: 0;
  box-shadow: none;
  color: inherit;
  cursor: text;
  -ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.nx-page div.select2-container-disabled > a.select2-choice {
  height: auto;
  line-height: inherit;
  padding: 0;
}

.nx-page div.select2-container-disabled span.select2-arrow {
  display: none !important;
}

// Sortable mode
.nx-page .ui-sortable .select2-search-choice {
  cursor: move;
}

// Apply default form :focus style
.nx-page .select2-container.select2-container-active .select2-choice,
.nx-page .select2-container-multi.select2-container-active .select2-choices {
  border-color: #2e9cff;
  box-shadow: 0 0 3px #b5dcff;
  color: $shade-strong-100;
}

// Tags
.nx-page .s2tagContainerCssClass .select2-choices {
  background-color: none;
  border-color: transparent;
  box-shadow: none;
}

.nx-page .s2tagContainerCssClass .select2-choices .select2-input.select2-default {
  background: url('${basePath}/icons/action_add.gif') no-repeat scroll 0 5px transparent !important;
  min-width: 9em;
  padding-left: 1.5em;
}

.nx-page .s2tagContainerCssClass .select2-choices .select2-input {
  background: url('${basePath}/icons/action_add.gif') no-repeat scroll 0 5px transparent !important;
}

.nx-page .s2tagContainerCssClass .select2-choices .select2-input.select2-focused {
  background: none !important;
}

.nx-page .s2tagContainerCssClass.select2-container-active .select2-choices,
.nx-page .s2tagContainerCssClass:hover .select2-choices {
  background-color: $shade-light-0;
  border-color: $shade-medium-10;
}

.nx-page .select2-results .s2newTag,
.nx-page .s2tagDropdownCssClass .select2-result-label .s2newTag {
  color: $success-label;
  font-weight: bold;
}
